package com.woniu.market_stall.mapper;

import com.woniu.market_stall.entity.Log;
import com.woniu.market_stall.vo.LogVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LogMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Log record);

    Log selectByPrimaryKey(Integer id);

    List<Log> selectAll();

    int updateByPrimaryKey(Log record);

    //自写方法
    List<LogVo> selectLogByName(String name);

    @Delete("UPDATE log SET is_delete=1 WHERE id = #{id}")
    void delete(Integer id);

    void delBatch(String id);


    void addLog(LogVo logVo);
}